package com.it.springbootmybatis.dao;

import com.it.springbootmybatis.domain.Company;
import com.it.springbootmybatis.query.CompanyQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @projectName: springboot-practice
 * @package: com.it.springbootmybatis.dao
 * @className: CompanyDao
 * @author: Navid
 * @description: TODO
 * @date: 2021/10/23 11:32
 * @version: 1.0
 */
@Mapper
@Repository
public interface CompanyDao {

    /**
     * 根据主键查询company
     *
     * @param id:
     * @return Company
     */
    Company findOne(int id);

    /**
     * 查询所有
     *
     * @return: 公司列表数据
     */
    List<Company> findAll();

    /**
     * 保存company到数据库
     *
     * @param company:
     * @return void
     */
    void insert(Company company);

    void delete(int id);

    List<Company> queryPaged(CompanyQuery companyQuery);
}
